x86: fix MCE/NMI injection
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 1 Dec 2009 14:02:00 +0000 (14:02 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 1 Dec 2009 14:02:00 +0000 (14:02 +0000)
commit95b697252f765f9433c45f7115ed9ce0abcbf170
tree20d54c39a5b0fe47b65e9c5f94382faa3f7bfc37
parent22b984ae9a41041ecbab3eb487de75e3f1ffb592
x86: fix MCE/NMI injection

This attempts to address all the concerns raised in
http://lists.xensource.com/archives/html/xen-devel/2009-11/msg01195.html,
but I'm nevertheless still not convinced that all aspects of the
injection handling really work reliably. In particular, while the
patch here on top of the fixes for the problems menioned in the
referenced mail also adds code to keep send_guest_trap() from
injecting multiple events at a time, I don't think the is the right
mechanism - it should be possible to handle NMI/MCE nested within
each other.

Another fix on top of the ones for the earlier described problems is
that the vCPU affinity restore logic didn't account for software
injected NMIs - these never set cpu_affinity_tmp, but due to it most
likely being different from cpu_affinity it would have got restored
(to a potentially random value) nevertheless.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 files changed:
xen/arch/x86/cpu/mcheck/mctelem.c
xen/arch/x86/nmi.c
xen/arch/x86/traps.c
xen/arch/x86/x86_32/asm-offsets.c
xen/arch/x86/x86_32/entry.S
xen/arch/x86/x86_32/traps.c
xen/arch/x86/x86_64/asm-offsets.c
xen/arch/x86/x86_64/compat/entry.S
xen/arch/x86/x86_64/compat/traps.c
xen/arch/x86/x86_64/entry.S
xen/arch/x86/x86_64/traps.c
xen/common/domain.c
xen/include/asm-x86/domain.h
xen/include/asm-x86/system.h
xen/include/asm-x86/traps.h
xen/include/xen/sched.h